package com.zy.dp.factorymethod.example3;

public abstract class Creator
{

	protected abstract ProductA factoryMethodA();
	protected abstract ProductB factoryMethodB();
	
	public Product createProduct()
	{
		
		ProductA a = factoryMethodA();
		ProductB b = factoryMethodB();
		
		Product product = new ConcreteProduct();
		product.setProductA(a);
		product.setproductB(b);
		
		return product;
		
		
		
		
		
		
		
	}
	
	
	
	
	
	
}
